package com.lphj.datainterface.service.impl;

import com.lphj.datainterface.dao.TGoodsDao;
import com.lphj.datainterface.entity.TGoods;
import com.lphj.datainterface.service.TGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TGoodsServiceImpl implements TGoodsService {

    @Autowired
    TGoodsDao tGoodsDao;

    @Override
    public int addTGoods(TGoods tGoods) {
        return tGoodsDao.AddTGoods(tGoods);
    }

    @Override
    public int getMaxId() {
        return tGoodsDao.GetMaxId();
    }

    @Override
    public String getBarCode(Map<String,Object> paramterMap) {
        return tGoodsDao.GetBarCode(paramterMap);
    }

    @Override
    public List<TGoods> getTGoodsByGoodsNO2() {
        return tGoodsDao.GetTGoodsByGoodsNO2();
    }

    @Override
    public TGoods getGoodsBySGoodsNO2(String sGoodsNO2,String sSpec) {
        return tGoodsDao.GetGoodsBySGoodsNO2(sGoodsNO2,sSpec);
    }

    @Override
    public int delTGoodsByAll() {
        return tGoodsDao.DelTGoodsByAll();
    }


    @Override
    public int unifiedTGoods(String sGoodsNO2, String sGoodsDesc,String sGoodsNO3) {
        return tGoodsDao.UnifiedTGoods(sGoodsNO2,sGoodsDesc,sGoodsNO3);
    }

    @Override
    public TGoods getTGoodsByGoodsName(String sGoodsDesc) {
        return tGoodsDao.GetTGoodsByGoodsName(sGoodsDesc);
    }

    @Override
    public TGoods getGoodsBySGoodsNO3(String sGoodsNO3) {
        return tGoodsDao.GetGoodsBySGoodsNO3(sGoodsNO3);
    }
}
